#ifndef LONGKEY_IM_MAIN_FRAME_H_
#define LONGKEY_IM_MAIN_FRAME_H_

#include "../DuiLib/Utils/WinImplBase.hpp"
#include "skin_change_event.h"

using namespace DuiLib;

class DesktopFrame : public DuiLib::WindowImplBase
{
public:
	DesktopFrame();
	~DesktopFrame();

	virtual void OnFinalMessage(HWND hWnd);

	DWORD GetBkColor();
	void SetBkColor(DWORD dwBkcolor);

	virtual CControlUI* CreateControl(LPCTSTR pstrClass);

protected:
	virtual void Notify(TNotifyUI &msg);
	void OnPrepare(TNotifyUI& msg);

	LPCTSTR GetWindowClassName() const;

	LRESULT ResponseDefaultKeyEvent(WPARAM wParam);

	virtual CDuiString GetSkinFolder();
	virtual CDuiString GetSkinFile();

	virtual LRESULT OnNcHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	virtual LRESULT OnSysCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);

private:
	int bk_image_index_;

	SkinChangedObserser skin_changed_observer_;
};

#endif